package cn.smbms.service;

import cn.smbms.dao.WorkingMapper;
import cn.smbms.pojo.Working;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("workingService")
public class WorkingServiceImpl implements WorkingService {

    @Resource
    private WorkingMapper workingMapper;

    @Override
    public List<Working> queryAll() {
        return workingMapper.queryAll();
    }

    @Override
    public boolean add(Working working) {
        boolean flag = false;
        if(workingMapper.add(working) > 0){
            flag = true;
        }
        return flag;
    }

    @Override
    public Working getWorkingById(String id) {
        return workingMapper.getWorkingById(id);
    }


}
